import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 列表查询 */
export const getPaperList = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/paper/page"), {
    params: filerEmptyVal(params)
  });
};

/** 详情 */
export const getPaperDetail = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/paper/detail"), {
    params: filerEmptyVal(params)
  });
};

/** 新增 */
export const addPaper = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/paper/add"), {
    data: filerEmptyVal(data)
  });
};

/** 审核 */
export const checkPaper = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/paper/examineStatus"), {
    data: filerEmptyVal(data)
  });
};

/** 修改 */
export const upPaper = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/paper/update"), {
    data
  });
};

/** 删除 */
export const delPaper = (dataId?: number) => {
  return http.request<any>("post", baseUrlApi("/paper/delete?id=" + dataId));
};
